home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
8_7.lha
/
8_7
/
8_7_init.c
next >
Wrap
Text File
|
1993-08-08
|
625b
|
21 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ declare a suitable amount of buffer space
tatic char cout_buf[1], cerr_buf[1], cin_buf[1];
/ Make filebuf's to manage that space.
/ Bind it to the UNIX FILE pointers
tatic filebuf cout_file
(stdout, cout_buf, sizeof(cout_buf));
tatic filebuf cerr_file
(stderr, cerr_buf, sizeof(cerr_buf));
tatic filebuf cin_file
(stdin, cin_buf, sizeof(cin_buf));
/ make the streams providing the user interface
stream cout(&cout_file);
stream cerr(&cerr_file);
stream cin(&cin_file);